<template>
  <div class="user-list-container">
    <h3 class="module-title">🔍 用户管理模块（来自远程应用）</h3>
    <div class="user-table">
      <div class="table-header">
        <span>ID</span>
        <span>用户名</span>
        <span>角色</span>
      </div>
      <div class="table-body">
        <div class="table-row" v-for="user in userList" :key="user.id">
          <span>{{ user.id }}</span>
          <span>{{ user.name }}</span>
          <span>{{ user.role }}</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
// 模拟用户数据
const userList = [
  { id: 1, name: '张三', role: '系统管理员' },
  { id: 2, name: '李四', role: '运营专员' },
  { id: 3, name: '王五', role: '普通用户' }
];
</script>

<style scoped>
.user-list-container {
  padding: 20px;
  background-color: #f5f5f5;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.module-title {
  color: #333;
  margin-bottom: 20px;
  font-size: 18px;
}

.user-table {
  width: 100%;
  background-color: white;
  border-radius: 4px;
  overflow: hidden;
}

.table-header {
  display: flex;
  background-color: #e6f7ff;
  font-weight: bold;
  padding: 12px 20px;
  border-bottom: 1px solid #d9d9d9;
}

.table-header span {
  flex: 1;
  color: #1890ff;
}

.table-body {
  padding: 0;
}

.table-row {
  display: flex;
  padding: 12px 20px;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.3s;
}

.table-row:hover {
  background-color: #fafafa;
}

.table-row span {
  flex: 1;
  color: #333;
}

.table-row:last-child {
  border-bottom: none;
}
</style>